package com.atguigu.bigdata.scala.mytest.chapter09

object Test_ScalaImplicit {

  def main(args: Array[String]): Unit = {
    implicit def transform( student : Student ): StudentExt = {
      new StudentExt
    }

    implicit def transform1( student : Student ): StudentExt1 = {
      new StudentExt1
    }

    import com.atguigu.bigdata.scala.mytest.chapter09.Ext._
    val student: Student = new Student()
    student.testA()
    student.testA1()
    student.test()
    //类隐式转换
    student.testB()

    val teacher: Teacher = new Teacher()
    teacher.testB()
  }


}


class StudentExt{
  def testA()={
    println("test122222")
  }
}

class StudentExt1{
  def testA1()={
    println("test122222")
  }
}

class Student{
  def test()={
    println("test1111111111111111111111")
  }
}

class Teacher{
  def test()={
    println("test1111111111111111111111")
  }
}